package com.aloda.ojjudge.controller.inner;

import com.aloda.ojjudge.service.JudgeService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 判题模块内部接口
 *
 * @Author aloda
 * @Date 2025/4/29 13:54
 */
@RestController
@RequestMapping("/judge/inner")
public class JudgeInnerController {

    @Resource
    private JudgeService judgeService;

    /**
     * 根据提交记录id做判题任务
     * @param id 提交记录id
     */
    @PostMapping("/{id}")
    public void doJudge(@PathVariable Long id) {
        judgeService.doJudge(id);
    }
}
